/* Shared styles for label UI across templates */

/* Cards */
.template-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  transition: all 0.3s ease;
  border-left: 4px solid #0d6efd; /* Bootstrap primary */
}
.template-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }
.template-card.default { border-left-color: #198754; background: linear-gradient(135deg, #f8fff9 0%, #ffffff 100%); }
.template-card.public { border-left-color: #0dcaf0; }
.template-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.template-title { font-size: 1.1rem; font-weight: 600; margin: 0; color: #343a40; }
.template-badges { display: flex; gap: 6px; }

/* Config block */
.template-config { background: #f8f9fa; border-radius: 8px; padding: 12px; margin: 10px 0; font-size: 0.9rem; }
.config-item { display: inline-block; margin-right: 15px; margin-bottom: 6px; }

/* Actions */
.template-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.btn-custom { border-radius: 20px; padding: 8px 20px; font-size: 0.9rem; transition: all 0.2s ease; }
.btn-custom:hover { transform: translateY(-1px); }

/* Search/utility card */
.search-card { background: #ffffff; border-radius: 12px; padding: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); margin-bottom: 20px; }

/* Template grid and preview */
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
@media (max-width: 768px) { .template-grid { grid-template-columns: 1fr; } .template-actions { justify-content: center; } }
.template-preview { width: 100%; height: 140px; background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); border: 2px dashed #dee2e6; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; border-radius: 8px; position: relative; overflow: hidden; }
.template-size-indicator { position: absolute; top: 10px; right: 10px; background: rgba(13,110,253,0.9); color: #fff; padding: 4px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.template-usage-count { background: #e7f1ff; color: #0d6efd; padding: 2px 8px; border-radius: 10px; font-size: 0.8rem; font-weight: 500; }

/* Quick actions */
.quick-actions { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 20px; border: 1px solid #dee2e6; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.quick-action-btn { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border: none; color: #fff; padding: 12px 20px; border-radius: 8px; font-weight: 500; transition: all 0.2s ease; margin-right: 10px; margin-bottom: 10px; }
.quick-action-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3); color: #fff; }

/* Create template card (CTA) */
.create-template-card { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; border-radius: 12px; padding: 25px; text-align: center; margin-bottom: 20px; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.create-template-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,0.2); }

/* Filter section */
.filter-section { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); padding: 25px; border-radius: 12px; margin-bottom: 25px; border: 1px solid #dee2e6; }

/* Template action buttons */
.template-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-template-action { padding: 6px 12px; font-size: 0.8rem; border-radius: 6px; transition: all 0.2s ease; border: none; cursor: pointer; display: flex; align-items: center; gap: 4px; }
.btn-template-edit { background: linear-gradient(135deg, #17a2b8, #20c997); color: #fff; }
.btn-template-preview { background: linear-gradient(135deg, #28a745, #20c997); color: #fff; }
.btn-template-use { background: linear-gradient(135deg, #0d6efd, #6610f2); color: #fff; }
.btn-template-duplicate { background: linear-gradient(135deg, #ffc107, #fd7e14); color: #212529; }
.btn-template-delete { background: linear-gradient(135deg, #dc3545, #e83e8c); color: #fff; }
.btn-template-action:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* Preview watermark */
.template-preview::after { content: 'Brother PT-9500PC'; position: absolute; bottom: 5px; right: 8px; font-size: 0.7rem; color: #6c757d; background: rgba(255,255,255,0.8); padding: 2px 6px; border-radius: 3px; }

/* History list */
.history-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); margin-bottom: 20px; transition: all 0.3s ease; }
.history-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.history-info { flex: 1; }
.history-meta { text-align: right; font-size: 0.9rem; color: #666; }
.asset-list { background: #f8f9fa; border-radius: 8px; padding: 10px; margin: 10px 0; max-height: 100px; overflow-y: auto; }
.asset-tag { display: inline-block; background: #e9ecef; color: #495057; padding: 2px 8px; border-radius: 12px; font-size: 0.8rem; margin: 2px; }
.config-summary { font-size: 0.9rem; color: #666; }
.stats-card { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; border-radius: 12px; padding: 25px; text-align: center; margin-bottom: 20px; }
.stat-item { margin: 10px 0; }
.stat-number { font-size: 2rem; font-weight: 700; display: block; }
.stat-label { font-size: 0.9rem; opacity: 0.9; }

/* Label size helpers used in previews */
.label-size-6mm { width: 48px; height: 160px; }
.label-size-9mm { width: 72px; height: 160px; }
.label-size-12mm { width: 96px; height: 160px; }
.label-size-18mm { width: 144px; height: 160px; }
.label-size-24mm { width: 192px; height: 160px; }
.label-size-36mm { width: 288px; height: 160px; }

/* Generic label preview box */
.label-preview { min-height: 120px; background: #f8f9fa; }

/* Modal preview container and printer status */
.preview-container { background: #f8f9fa; padding: 30px; border-radius: 8px; }
.printer-status { background: #e8f5e9; border-radius: 6px; }
.preview-image { max-width: 100%; height: auto; }
.preview-image-full { max-width: 100%; max-height: 100%; }
.icon-primary { color: #0d6efd !important; }

/* Inline-style replacements for modal preview */
.text-12 { font-size: 12px; }
.text-10 { font-size: 10px; }
.text-9  { font-size: 9px; }
.qr-placeholder { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 8px; background: #fff; border: 1px solid #dee2e6; }

/* ============== Batch Print Page ============== */
.filter-card { background: #fff; border-radius: 15px; padding: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); margin-bottom: 20px; }
.asset-selection-card { background: #fff; border-radius: 15px; padding: 25px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); margin-bottom: 20px; }
.asset-item { position: relative; border: 2px solid #e9ecef; border-radius: 10px; padding: 15px; margin-bottom: 10px; transition: all 0.3s ease; cursor: pointer; }
.asset-item:hover { border-color: #0d6efd; background-color: #f8f9ff; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.asset-item.selected { border-color: #28a745; background-color: #f8fff9; }
.asset-item.selected::before { content: '✓'; position: absolute; top: 10px; right: 15px; color: #28a745; font-weight: bold; font-size: 18px; }
.asset-info { display: flex; justify-content: space-between; align-items: center; }
.asset-details h6 { margin: 0 0 5px 0; color: #333; font-weight: 600; }
.asset-meta { font-size: 0.9em; color: #666; }
.asset-status { text-align: right; }
.print-options-card { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; border-radius: 15px; padding: 25px; margin-bottom: 20px; }
.btn-custom { border-radius: 25px; padding: 12px 30px; font-weight: 500; margin: 5px; transition: all 0.3s ease; }
.btn-custom:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.selection-summary { background: #f8f9fa; border-radius: 10px; padding: 15px; margin: 15px 0; border-left: 4px solid #0d6efd; }
.pagination-container { display: flex; justify-content: center; margin: 20px 0; }
.search-container { position: relative; }
.search-container .fas { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #6c757d; }
.search-container input { padding-left: 45px; }

/* Inputs common look */
.form-control, .form-select { border-radius: 10px; border: 2px solid #e9ecef; padding: 10px 15px; transition: all 0.3s ease; }
.form-control:focus, .form-select:focus { border-color: #0d6efd; box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.25); }

/* ============== Print Config Page ============== */
.config-card { background: #fff; border-radius: 15px; padding: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); margin-bottom: 20px; }
.preview-card { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; border-radius: 15px; padding: 25px; margin-bottom: 20px; }
.label-preview { background: #fff; color: #000; border: 2px solid #ddd; border-radius: 8px; padding: 15px; margin: 15px 0; position: relative; min-height: 120px; display: flex; align-items: center; justify-content: space-between; }
.label-content { flex: 1; }
.label-qr, .preview-qr { width: 60px; height: 60px; background: #f0f0f0; border: 1px solid #ccc; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #666; }
.size-option { border: 2px solid #e9ecef; border-radius: 10px; padding: 15px; margin: 10px 0; cursor: pointer; transition: all 0.3s ease; }
.size-option:hover { border-color: #0d6efd; background-color: #f8f9ff; }
.size-option.selected { border-color: #28a745; background-color: #f8fff9; }
.size-option input[type="radio"] { display: none; }
.layout-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin: 15px 0; }
.layout-option { border: 2px solid #e9ecef; border-radius: 10px; padding: 15px; text-align: center; cursor: pointer; transition: all 0.3s ease; }
.layout-option:hover { border-color: #0d6efd; background-color: #f8f9ff; }
.layout-option.selected { border-color: #28a745; background-color: #f8fff9; }
.layout-option input[type="radio"] { display: none; }
.asset-summary { background: #f8f9fa; border-radius: 10px; padding: 15px; margin: 15px 0; border-left: 4px solid #0d6efd; }

/* ============== Delete Confirm Page ============== */
.delete-card { background: #fff; border-radius: 15px; padding: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); margin-bottom: 20px; border-left: 4px solid #dc3545; }
.template-info { background: #f8f9fa; border-radius: 10px; padding: 20px; margin: 20px 0; }
.warning-icon { font-size: 4em; color: #dc3545; margin-bottom: 20px; }

/* ============== Label Template Wizard (Form) ============== */
.wizard-container { background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%); min-height: 100vh; padding: 20px 0; }
.wizard-card { background: #fff; border-radius: 20px; box-shadow: 0 20px 60px rgba(30,58,138,0.1); overflow: hidden; margin-bottom: 30px; }
.wizard-header { background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); color: #fff; padding: 30px; text-align: center; }
.wizard-steps { display: flex; justify-content: center; padding: 20px 0; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.step { display: flex; align-items: center; margin: 0 15px; color: #64748b; font-weight: 500; }
.step-number { width: 35px; height: 35px; border-radius: 50%; background: #e2e8f0; display: flex; align-items: center; justify-content: center; margin-right: 10px; font-weight: bold; transition: all 0.3s ease; }
.step.active { color: #3b82f6; }
.step.completed { color: #10b981; }
.step.active .step-number { background: #3b82f6; color: #fff; }
.step.completed .step-number { background: #10b981; color: #fff; }
.wizard-content { padding: 40px; }
.step-content { display: none; }
.step-content.active { display: block; }
.template-preset { border: 3px solid #e2e8f0; border-radius: 15px; padding: 25px; margin-bottom: 20px; cursor: pointer; transition: all 0.3s ease; background: #fff; }
.template-preset:hover { border-color: #0ea5e9; transform: translateY(-5px); box-shadow: 0 10px 30px rgba(14,165,233,0.15); }
.template-preset.selected { border-color: #10b981; background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%); }
.template-preset input[type="radio"] { display: none; }
.preset-header { display: flex; justify-content: between; align-items: center; margin-bottom: 15px; }
.preset-title { font-size: 18px; font-weight: 600; color: #1e3a8a; margin: 0; }
.preset-badge { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.badge-recommended { background: #10b981; color: #fff; }
.badge-compact { background: #f59e0b; color: #fff; }
.badge-detailed { background: #3b82f6; color: #fff; }
.preset-preview { background: #f8fafc; border: 2px dashed #cbd5e1; border-radius: 10px; padding: 20px; margin-top: 15px; min-height: 120px; display: flex; align-items: center; justify-content: space-between; }
.preview-content { flex: 1; }
.form-section { background: #fff; border-radius: 15px; padding: 30px; margin-bottom: 25px; border: 1px solid #e2e8f0; }
.section-title { color: #1e3a8a; font-size: 20px; font-weight: 600; margin-bottom: 20px; display: flex; align-items: center; }
.section-title i { margin-right: 10px; color: #0ea5e9; }
.content-option { background: #fff; border: 2px solid #e2e8f0; border-radius: 12px; padding: 20px; margin-bottom: 15px; transition: all 0.3s ease; }
.content-option:hover { border-color: #0ea5e9; background: #f0f9ff; }
.content-option.selected { border-color: #10b981; background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%); }
.option-header { display: flex; align-items: center; margin-bottom: 10px; }
.option-icon { width: 40px; height: 40px; border-radius: 10px; background: #e0f2fe; display: flex; align-items: center; justify-content: center; margin-right: 15px; color: #3b82f6; }
.live-preview { position: sticky; top: 20px; background: #fff; border-radius: 20px; padding: 30px; box-shadow: 0 10px 40px rgba(30,58,138,0.1); border: 1px solid #e2e8f0; }
.preview-header { background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%); color: #fff; padding: 20px; border-radius: 15px; margin-bottom: 25px; text-align: center; }
.preview-info { background: #f8fafc; border-radius: 10px; padding: 15px; margin-top: 15px; }
.wizard-navigation { background: #f8fafc; padding: 25px 40px; border-top: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; }
.btn-wizard { padding: 12px 30px; border-radius: 25px; font-weight: 600; transition: all 0.3s ease; border: none; }
.btn-wizard:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
/* Label preview elements */
.label-preview .qr { 
  width: 50px; 
  height: 50px; 
  background: #e2e8f0; 
  border-radius: 8px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 10px; 
  color: #64748b; 
  margin-left: 15px; 
}

/* Label text styles */
.label-title {
  font-weight: bold;
  font-size: 12px;
  margin-bottom: 5px;
}

.label-subtitle {
  font-size: 10px;
  margin-bottom: 3px;
}

.label-meta {
  font-size: 9px;
  margin-bottom: 3px;
}

.label-meta-small {
  font-size: 8px;
  color: #666;
  margin-bottom: 3px;
}

.label-timestamp {
  font-size: 8px;
  color: #666;
  margin-top: 8px;
}

/* Preview content */
.preview-content {
  flex: 1;
}

/* Button visibility helpers */
.hidden { display: none !important; }
